import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        // 默认重定向到登录页
        {
            path: "/",
            redirect: "/home"
        },
        {
            path: '/home',
            name: 'home',
            component: () => import('../views/Home.vue')
        },
        {
            path: '/menu-manage',
            name: 'menuManage',
            component: () => import('../views/menu/MenuManage.vue')
        },
        {
            path: '/role-manage',
            name: 'roleManage',
            component: () => import('../views/role/RoleManage.vue')
        },
        {
            path: '/employee-manage',
            name: 'employeeManage',
            component: () => import('../views/employee/EmployeeManage.vue')
        },
        {
            path: '/config-manage',
            name: 'configManage',
            component: () => import('../views/config/ConfigManage.vue')
        }
    ]
})

export default router
